<template>
	<view class="">
		<view class="intermediary">
			中介法规考试
		</view>
		<view class="timebox">
			<view class="time">
				<text>考试时间：</text>
				<text>{{date}}</text>
				<text>{{nowtime}}</text>
			</view>
			<view class="alltime">
				答题时间：{{obj.use_time}}分钟
			</view>
		</view>
		<view class="notice">
			考试须知
		</view>
		<view class="noticedetails"v-for="(items,indexs) in obj.notice" :key="indexs">
			{{items}}
		</view>
		<view class="begin" @click="begin">
			开始考试
		</view>
	</view>
</template>

<script>
	import {
		getanswerinfo
	} from "../../api/api/index"
	export default {
		data() {
			return {
				obj:{},
				date:"",
				nowtime:"",
				arrivetime:""
			}
		},
		methods: {
			begin(){
				this.jumpLink({link:"/pages/exam/index",query:{id:this.obj.id,time:this.obj.use_time}})
			}
		},
		onLoad(e) {
			let data=new Date()
			this.date=data.getFullYear()+'-'+(data.getMonth()+1)+'-'+data.getDate()
			this.nowtime=data.getHours()+':'+data.getMinutes()
			getanswerinfo({id:e.id}).then(res => {
				this.obj=res.data
			})
		},
		onShow() {
			
		}
	}
</script>

<style scoped lang="less">
	.intermediary {
		font-family: MicrosoftYaHei-Bold;
		font-size: 36rpx;
		font-weight: 700;
		color: #333333;
		text-align: center;
		margin-top: 121rpx;
	}

	.timebox {
		font-family: MicrosoftYaHei;
		font-size: 24rpx;
		color: #666666;
		margin-top: 20rpx;
		margin-left: 150rpx;
		line-height: 48rpx;
		.time{
			text{
				margin-right: 10rpx;
			}
		}
	}

	.notice {
		font-family: MicrosoftYaHei-Bold;
		font-size: 28rpx;
		font-weight: 700;
		color: #000000;
		margin-left: 25rpx;
		margin-top: 119rpx;
	}

	.noticedetails {
		font-family: MicrosoftYaHei;
		font-size: 24rpx;
		color: #333333;
		margin-left: 39rpx;
		width: 662rpx;
		line-height: 48rpx;
		margin-top: 50rpx;
	}

	.begin {
		width: 700rpx;
		height: 90rpx;
		background-color: #fc7b63;
		border-radius: 5rpx;
		text-align: center;
		font-family: MicrosoftYaHei;
		font-size: 30rpx;
		line-height: 80rpx;
		color: #ffffff;
		margin-left: 29rpx;
		margin-top: 221rpx;
		margin-bottom: 100rpx;
	}
</style>
